//
//  CommonCollectionViewCell.m
//  BaseProject
//
//  Created by itzhaolei on 2024/5/13.
//

#import "CommonCollectionViewCell.h"

@implementation CommonCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        NSLog(@"单元格被实例化");
        self.contentView.backgroundColor = [UIColor.qmui_randomColor colorWithAlphaComponent:0.5];
        [self addSubviews];
        [self addConstraints];
        [self addActions];
    }
    return self;
}

#pragma mark - Add
- (void)addSubviews {
    [self.contentView addSubview:self.contentLabel];
}

#pragma mark - Constraints
- (void)addConstraints {
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}

#pragma mark - Actions
- (void)addActions {
    
}

#pragma mark - Lazy
- (UILabel *)contentLabel {
    if (!_contentLabel) {
        UILabel *view = [[UILabel alloc] init];
        view.textColor = [UIColor qmui_colorWithHexString:@"#000000"];
        view.font = [UIFont systemFontOfSize:18 weight:(UIFontWeightRegular)];
        view.textAlignment = NSTextAlignmentCenter;
        view.numberOfLines = 0;
        _contentLabel = view;
    }
    return _contentLabel;
}

@end
